<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\NewsController;
use App\Http\Controllers\ProductsController;
use App\Http\Controllers\MenusController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});
Route::post('/home',[HomeController::class,'index']);
Route::get('/qianyi',[HomeController::class,'qianyi']);
Route::get('/uploadTest',[HomeController::class,'testStorage']);
Route::post('/news/list',[NewsController::class,'list']);
Route::post('/news/detail',[NewsController::class,'detail']);
Route::post('/product/list',[ProductsController::class,'list']);
Route::post('/product/detail',[ProductsController::class,'detail']);
Route::post('/cookbook/list',[MenusController::class,'list']);
Route::post('/cookbook/detail',[MenusController::class,'detail']);
